package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.ArrayList;

@TableName("t_room")
public class RoomBean {
    @TableId(value = "pk_roomid",type = IdType.AUTO)
    //房间id
    private Integer roomId;
    @TableField("r_address")
    //房间地址
    private String roomAddress;
    @TableField("r_roomstate")
    //房间状态 默认--正常
    private String roomState = "正常";
    @TableField("r_roomtype")
    //房间类型
    private String roomType;
    @TableField("r_maxnum")
    //可住人数
    private Integer maxNum;
    @TableField(exist = false)
    //已住人数
    private Integer roomInNum;
    @TableField(exist = false)
    //入住学生
    private ArrayList<StudentBean> studentList;

    public RoomBean() {
    }

    public RoomBean(Integer roomId) {
        this.roomId = roomId;
    }

    public RoomBean(String roomAddress, String roomType) {
        this.roomAddress = roomAddress;
        this.roomType = roomType;
    }

    public RoomBean(String roomAddress,  String roomType, Integer maxNum) {
        this.roomAddress = roomAddress;
        this.roomType = roomType;
        this.maxNum = maxNum;
    }

    public RoomBean(Integer roomId, String roomAddress, String roomState, String roomType, Integer maxNum, Integer roomInNum, ArrayList<StudentBean> studentList) {
        this.roomId = roomId;
        this.roomAddress = roomAddress;
        this.roomState = roomState;
        this.roomType = roomType;
        this.maxNum = maxNum;
        this.roomInNum = roomInNum;
        this.studentList = studentList;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    public String getRoomAddress() {
        return roomAddress;
    }

    public void setRoomAddress(String roomAddress) {
        this.roomAddress = roomAddress;
    }

    public String getRoomState() {
        return roomState;
    }

    public void setRoomState(String roomState) {
        this.roomState = roomState;
    }

    public String getRoomType() {
        return roomType;
    }

    public void setRoomType(String roomType) {
        this.roomType = roomType;
    }

    public Integer getMaxNum() {
        return maxNum;
    }

    public void setMaxNum(Integer maxNum) {
        this.maxNum = maxNum;
    }

    public Integer getRoomInNum() {
        return roomInNum;
    }

    public void setRoomInNum(Integer roomInNum) {
        this.roomInNum = roomInNum;
    }

    public ArrayList<StudentBean> getStudentList() {
        return studentList;
    }

    public void setStudentList(ArrayList<StudentBean> studentList) {
        this.studentList = studentList;
    }

    @Override
    public String toString() {
        return "RoomBean{" +
                "roomId=" + roomId +
                ", roomAddress='" + roomAddress + '\'' +
                ", roomState='" + roomState + '\'' +
                ", roomType='" + roomType + '\'' +
                ", maxNum=" + maxNum +
                ", roomInNum=" + roomInNum +
                ", studentList=" + studentList +
                '}';
    }
}
